/*
 * This file is part of xReader.
 *
 * Copyright (C) 2008 hrimfaxi (outmatch@gmail.com)
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
 * for more details.
 *
 * You should have received a copy of the GNU General Public License along
 * with this program; if not, write to the Free Software Foundation, Inc.,
 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 */

#ifndef _COPY_H_
#define _COPY_H_

#include "common/datatype.h"

typedef void (*t_copy_cb) (const char *src, const char *dest, bool succ, void *data);
typedef bool(*t_copy_overwritecb) (const char *filename, void *data);

extern bool extract_archive_file(const char *archname, const char *archpath, const char *dest, t_copy_cb cb, t_copy_overwritecb ocb, void *data);
extern bool copy_file(const char *src, const char *dest, t_copy_cb cb, t_copy_overwritecb ocb, void *data);
extern u32 copy_dir(const char *src, const char *dest, t_copy_cb cb, t_copy_overwritecb ocb, void *data);
extern bool move_file(const char *src, const char *dest, t_copy_cb cb, t_copy_overwritecb ocb, void *data);
extern u32 move_dir(const char *src, const char *dest, t_copy_cb cb, t_copy_overwritecb ocb, void *data);

#endif
